package com.meituan.sdk.model.pms.settle.onlineRefund;

import com.meituan.sdk.annotations.ApiMeta;
import com.google.gson.reflect.TypeToken;
import javax.validation.constraints.NotBlank;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;

/**
* 在线退款
* This file was automatically generated.
*/
@ApiMeta(
    path = "/pms/settle/onlineRefund",
    businessId = 57,
    apiVersion = "10004",
    apiName = "online_refund",
    needAuth = true
)
public class OnlineRefundRequest implements MeituanRequest<OnlineRefundResponse> {
    /**
    * <p data-diff-id="ct-diff-id-61d25f80-066c-4d1f-a91e-8ea89d3cb031">酒店ID</p>
    */
    @NotNull(message = "hotelId不能为空")
    @SerializedName("hotelId")
    private Long hotelId;
    /**
    * <p data-diff-id="ct-diff-id-1424b112-29f1-4ce5-b79b-4fb9f6d903b0">PMS支付流水号</p>
    */
    @NotNull(message = "onlinePaymentId不能为空")
    @SerializedName("onlinePaymentId")
    private Long onlinePaymentId;
    /**
    * <p data-diff-id="ct-diff-id-ffd2f67b-4e2a-4611-9675-73e6a50e85c3">退款金额，<strong>只允许退款一次，单位为分，100代表1元</strong></p>
    */
    @NotNull(message = "refundAmount不能为空")
    @SerializedName("refundAmount")
    private Long refundAmount;
    /**
    * <p data-diff-id="ct-diff-id-278f7b7a-b6bf-4353-9577-b11974906e31"><span style="color: rgb(51, 51, 51)">房间号，如果BillId存在入住人信息则需要传</span></p>
    */
    @SerializedName("roomNumber")
    private String roomNumber;
    /**
    * <p data-diff-id="ct-diff-id-dd037aec-603d-450e-b47a-12c09683dc02"><span style="color: #333">客人姓名，如果BillId存在入住人信息则需要传</span></p>
    */
    @SerializedName("checkinCustomerName")
    private String checkinCustomerName;
    /**
    * <p data-diff-id="ct-diff-id-fd30f62e-7b63-4e84-b927-ad37123764d2">房间或者现付账账套ID</p>
    */
    @NotNull(message = "billId不能为空")
    @SerializedName("billId")
    private Long billId;
    /**
    * <p data-diff-id="ct-diff-id-156ae41b-a6ae-4631-85a9-2cf1226a7819"><span style="color: rgba(0, 0, 0, 0.65)">付款时入账的账务ID</span></p>
    */
    @NotNull(message = "billItemId不能为空")
    @SerializedName("billItemId")
    private Long billItemId;
    /**
    * <p data-diff-id="ct-diff-id-77a088c2-60ec-44fb-807d-2b9964703bd8">退款原因</p>
    */
    @NotBlank(message = "memo不能为空")
    @SerializedName("memo")
    private String memo;

    public Long getHotelId() {
        return hotelId;
    }
    public void setHotelId(Long hotelId) {
        this.hotelId = hotelId;
    }
    public Long getOnlinePaymentId() {
        return onlinePaymentId;
    }
    public void setOnlinePaymentId(Long onlinePaymentId) {
        this.onlinePaymentId = onlinePaymentId;
    }
    public Long getRefundAmount() {
        return refundAmount;
    }
    public void setRefundAmount(Long refundAmount) {
        this.refundAmount = refundAmount;
    }
    public String getRoomNumber() {
        return roomNumber;
    }
    public void setRoomNumber(String roomNumber) {
        this.roomNumber = roomNumber;
    }
    public String getCheckinCustomerName() {
        return checkinCustomerName;
    }
    public void setCheckinCustomerName(String checkinCustomerName) {
        this.checkinCustomerName = checkinCustomerName;
    }
    public Long getBillId() {
        return billId;
    }
    public void setBillId(Long billId) {
        this.billId = billId;
    }
    public Long getBillItemId() {
        return billItemId;
    }
    public void setBillItemId(Long billItemId) {
        this.billItemId = billItemId;
    }
    public String getMemo() {
        return memo;
    }
    public void setMemo(String memo) {
        this.memo = memo;
    }


    @Override
    public MeituanResponse<OnlineRefundResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<OnlineRefundResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "OnlineRefundRequest{" + "hotelId=" + hotelId + "," + "onlinePaymentId=" + onlinePaymentId + "," + "refundAmount=" + refundAmount + "," + "roomNumber=" + roomNumber + "," + "checkinCustomerName=" + checkinCustomerName + "," + "billId=" + billId + "," + "billItemId=" + billItemId + "," + "memo=" + memo + "}";
    }
}
